package com.yksj.healthtalk.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class ServerCenterMainItemEntity implements Serializable{
	   /*"FUNCTION_ID": 7,
       "DEFINED_NAME": "举报投诉",
       "NOTES": null,
       "MANAGE_FLAG": 0,
       "MERCHANT_ID": 1,
       "OPEN_STATE": 1*/
	private String FUNCTION_ID;
	private String DEFINED_NAME;
	private String NOTES;
//	private String MANAGE_FLAG;
	private String MERCHANT_ID;
	private String OPEN_STATE;
	private String PICPATH;
	private String SMALL_ANDROID_ICON_2X;
	private String Android_Icon;//3倍图
	
	public String getAndroid_Icon() {
		return Android_Icon;
	}


	public void setAndroid_Icon(String android_Icon) {
		Android_Icon = android_Icon;
	}


	public String getSMALL_ANDROID_ICON_2X() {
		return SMALL_ANDROID_ICON_2X;
	}


	public void setSMALL_ANDROID_ICON_2X(String sMALL_ANDROID_ICON_2X) {
		SMALL_ANDROID_ICON_2X = sMALL_ANDROID_ICON_2X;
	}


	public String getFUNCTION_ID() {
		return FUNCTION_ID;
	}
	
	
	public String getPICPATH() {
		return PICPATH;
	}


	public void setPICPATH(String pICPATH) {
		PICPATH = pICPATH;
	}


	public void setFUNCTION_ID(String fUNCTION_ID) {
		FUNCTION_ID = fUNCTION_ID;
	}
	public String getDEFINED_NAME() {
		return DEFINED_NAME;
	}
	public void setDEFINED_NAME(String dEFINED_NAME) {
		DEFINED_NAME = dEFINED_NAME;
	}
	public String getNOTES() {
		return NOTES;
	}
	public void setNOTES(String nOTES) {
		NOTES = nOTES;
	}
/*	public String getMANAGE_FLAG() {
		return MANAGE_FLAG;
	}
	public void setMANAGE_FLAG(String mANAGE_FLAG) {
		MANAGE_FLAG = mANAGE_FLAG;
	}*/
	public String getMERCHANT_ID() {
		return MERCHANT_ID;
	}
	public void setMERCHANT_ID(String mERCHANT_ID) {
		MERCHANT_ID = mERCHANT_ID;
	}
	public String getOPEN_STATE() {
		return OPEN_STATE;
	}
	public void setOPEN_STATE(String oPEN_STATE) {
		OPEN_STATE = oPEN_STATE;
	}
	
	public static List<ServerCenterMainItemEntity> parseToObject(JSONArray array){
		List<ServerCenterMainItemEntity> mainItemEntities ;
		try {
			mainItemEntities =new ArrayList<ServerCenterMainItemEntity>();
			int length=array.length();
			for (int i = 0; i <length; i++) {
				JSONObject object=  (JSONObject) array.get(i);
				ServerCenterMainItemEntity entity=new ServerCenterMainItemEntity();
				entity.setDEFINED_NAME(object.optString("DEFINED_NAME"));
				entity.setFUNCTION_ID(object.optString("FUNCTION_ID"));
				entity.setMERCHANT_ID(object.optString("MERCHANT_ID"));
				entity.setOPEN_STATE(object.optString("OPEN_STATE"));
				entity.setPICPATH(object.optString("SMALL_ANDROID_ICON"));
				entity.setSMALL_ANDROID_ICON_2X(object.optString("SMALL_ANDROID_ICON_2X"));
//				entity.setLOGO_ICON_2X(object.getString("LOGO_ICON_2X"));
				entity.setAndroid_Icon(object.optString("ANDROID_ICON"));
				mainItemEntities.add(entity);
			}
			
		} catch (JSONException e) {
			return null;
		}
		return mainItemEntities;
		
	}
	
	
}
